import request from '@/utils/request'

export default {
  config: (uri = '', parameter = null, method = 'GET') => {
    return request({
      url: `/config${uri}`,
      data: parameter,
      method: method
    })
  },
  passport: (uri = '', parameter = null, method = 'GET') => {
    return request({
      url: `/passport${uri}`,
      data: parameter,
      method: method
    })
  },
  upload: (uri = '', parameter = null, method = 'GET') => {
    return request({
      url: `/upload${uri}`,
      data: parameter,
      method: method
    })
  },
  route: (uri = '', parameter = null, method = 'GET') => {
    return request({
      url: `/authority/route${uri}`,
      data: parameter,
      method: method
    })
  },
  role: (uri = '', parameter = null, method = 'GET') => {
    return request({
      url: `/authority/role${uri}`,
      data: parameter,
      method: method
    })
  },
  user: (uri = '', parameter = null, method = 'GET') => {
    return request({
      url: `/user${uri}`,
      data: parameter,
      method: method
    })
  },
  account: (uri = '', parameter = null, method = 'GET') => {
    return request({
      url: `/account${uri}`,
      data: parameter,
      method: method
    })
  }
}